﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace DbDoc.PowerDoc.ViewModel
{
    public class ViewModelBase : INotifyPropertyChanged
    {
        #region Implementation of INotifyPropertyChanged

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
        }

        protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)
        {
            var handler = PropertyChanged;
            if (handler != null)
                handler(this, args);
        }

        #endregion

        public Action<string> Popup { get; set; }
        /// <summary>
        /// Pop up to show Information
        /// </summary>
        public Action<string, string> PopupInfo { get; set; }

        /// <summary>
        /// Pop up to show Error Message
        /// </summary>
        public Action<string, string> PopupError { get; set; }
    }

}
